home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 134 (1991-10)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 134 (1991-10)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
RxSlides
/
RxSlides.DOC
< prev
next >
Wrap
Text File
|
1990-03-08
|
8KB
|
218 lines
RxSlides
An IFF picture server controlled through ARexx
Release 1.2 Nov. 6, 1988
Placed in the public domain by Dean Bandes, author
You may use this in a commercial product, but if
you do, the decent thing to do is send me a free copy!
RxSlides is a background (load-and-stay-resident) program which can pop
up a picture upon command. It will also make a transition from one picture
to another, and has several types of transition.
RxSlides is based on a program called "Dissolve" that I found on
Amicus 15. The author of that program, Lee M. Robertson, ( PLINK: lmr )
wrote in his DOC file, "If someone was real ambitious they could do a
program like Dpslide that did a lot of different displays with a display
list." I guess I was "real ambitious", because that's one of the things
you can do with RxSlides. Because the commands to this program can be
written by an ARexx program, however, you can do much more powerful things
than just write a display list. For instance, the ARC file with this doc
includes an ARexx program that can read the directory of a disk and display
all the ".pic" pictures on it -- sort of a scriptless, automatic slide show.
RxSlides has worked fine for me with 320 by 200 pictures, including HAM
ones. I can't guarantee that bigger pictures will work, but I think the
main problem there is that I only have half a meg.
Lee R. wrote that [dissolving one picture into another].."requires that the
new picture has the same attributes (size, colors, ham, etc.) as the current
picture, because you can't change the screen attributes between the pictures."
What I tried to do was close the screen and open a new one if the attributes
didn't match; but I may not have been 100% successful. I partially got around
the problem of colors by interpolating the color maps from the old picture
into the new one. This can give some pretty peculiar effects, so I suggest
that if you are developing a set of pictures yourself, you keep the palettes
as similar as possible between pictures. For 32-color pictures, the color
interpolation seems the least disturbing with the "dissolve" transition
(and the "zap" transition, which doesn't interpolate and hardly counts).
For the HAM pictures I've tried, the "dissolve" transition gives unpleasant
results, but the "twipe" transition is beautiful. I haven't tried the others
in HAM, so see what you can see. My suspicion is that the "bwipe" will be
great, but that the "vblind" will stink.
Unless you are running ARexx, RxSlides won't do a thing for you except
chew up some of your memory. If you don't have ARexx, and you ran RxSlides
"just to see what it would do", it exited as soon as it failed to find the
Rexx system library.
If you have ARexx, create a rexx program file something like this
(say its name is CPix.rexx):
/* Charley slideshow */
address SLIDES
'trans zap'
'show df1:cluck.pic'
'wait 25'
'trans dissolve'
'show df1:robots.pic'
'wait 25'
'show df1:ghost4.pic'
'wait 50'
'exit'
This is assuming that you have 320 x 200 IFF picture files called
"cluck.pic", "robots.pic", and "ghost4.pic" on your df1: disk. Then do,
from CLI or Wshell,
>rexxmast
>RxSlides
then from Wshell
>CPix (or whatever your rexx program is)
or from CLI
>rx CPix
You should see the first picture appear on the screen, then dissolve
into the second, then dissolve into the third; then after another second
you will be back to the CLI screen.
Alternatively, copy autosli.rexx and RxSlides to ram: and cd to ram:.
Start ARexx (by doing rexxmast if you haven't yet), put a disk with some
320 X 200 IFF picture files named <something>.pic in df1:, and run
autosli.rexx (rx autosli from CLI, autosli from Wshell). You should see
an automatic slideshow.
Note that the Rexx address of this program is SLIDES. If you run two
copies of this at once, the address of the second is SLIDESA. If you
run a third, the address of the third should be SLIDESB, and so on to
SLIDESZ, but I haven't tried more than two.
Commands accepted:
show <filename> display the IFF picture in <filename>
speed <integer> controls the number of picture bits set
between successive "blit"s; 1280 is the
default.
wait <integer> wait that number of 1/50-th's of a second
before accepting another command. This
lets you control the speed of the slideshow.
NOTE: this is 1/50-th's of a second! It's
not the same as other slideshow programs I've
bumped into! I decided to let you enter the
parameter that I will pass to the system Delay()
subroutine; this gives finer control of timing
for possible synchronization with music or
whatever.
failat <integer> gives you some control of how serious a problem
will cause the program to exit. Default is
21, which asks the program to try its best
not to exit until you ask it to. I recommend
that you leave this parameter alone. The error
codes are as follows:
1 Unknown command received from ARexx
5 File is not an ILBM picture file
6 File is not a picture file
7 Unable to open the file
8 File contains an invalid picture size
9 File is missing a bit map header
10 File BMHD chunk is the wrong size
11 Not enough memory for picture body
12 File has an invalid decode flag
13 Read error
14 Insufficient memory
15 Unable to open window
16 Unable to open screen
21 Program is exiting
22 Invalid command-line arguments
23 Unable to open required libraries
24 Unable to open message port
The program "saysts.rexx" will report the above
error messages, given the error code; if it's on
the Rexx search path, then from WShell, just enter
(for instance) "saysts 14" and you will get
"Insufficient memory".
index <integer> I think that this controls which of several
pseudo-random bit patterns is used for the
"dissolve" transition. This can be any integer
from 2 to 32, and values outside that range will
be limited to that range. I'm not really sure
what this parameter does, and I recommend
that you leave it alone.
trans <codeword or integer>
Controls the type of transition between pictures.
I took LMR's suggestions about some types of
effects and have implemented the following:
trans zap instantly pop up the new picture all at once.
or trans 0
trans twipe wipe the new picture from top to bottom
or trans 1
trans bwipe wipe the new picture from bottom to top
or trans 2
trans lwipe wipe the new picture from left to right
or trans 3
trans rwipe wipe the new picture from right to left
or trans 4
trans vblind venetian blinds transition -- new picture
or trans 5 appears as lots of vertical lines that get wider
and wider. Try it, but I won't say "try it, you'll
like it".
trans dissolve the good old original, and I think the
or trans 6 best for widely differing palettes.
front pops the picture screen to the front. Useful only
after --
back pushes the picture screen to the back. You could
do this before Rexx wants to write some output,
and then do a "front"; or maybe have two copies
of RxSlides running, and flip-flop between the
two pictures. Or load a picture of a nude and
do 'back';'wait 30000';'front';'wait 5';'back' --
for 1/10 of a second, after a 10 minute wait,
someone else using your machine will wonder if
he just hallucinated!
close close the picture window and screen, but leave
RxSlides running. That way you don't have to
get RxSlides off the disk again to run it, but
of course it is taking up memory.
exit stop the RxSlides background process
quit ditto
My source is intended for the Lattice C environment.
I'll now leave it up to your imagination to do other things with this.
I hope to add more transition types. Please write via US Mail with bug
reports, news of applications using this, or suggested enhancements.
Of course I wouldn't mind some shareware contributions, but since much of
this was Lee Robertson's work I won't make a big pitch. Hey -- somebody
who's on PLINK, leave some mail for him to tell him what happened to his
program!
Good Luck,
Dean Bandes
225 Cypress Street
Newton Centre, MA 02159
(617) 965-1268